#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = int;
bool prime(ll x)
{
    if(x==1||x==2)
        return 1;
    for (ll i = 2; i <= sqrt(x);i++)
    {
        if(x%i==0)
            return 0;
    }
    return 1;
}

void solve()
{
    ll n;
    cin >> n;
    // if(prime(n))
    // {
    //     cout << 2 << endl;
    //     cout << 1 << "*" << n;
    //     return ;
    // }

    ll begin ,max_count=0;
    for (ll i = 2; i <= sqrt(n);i++)
    {
        ll l = 0;
        ll t = n,q=i;
        while(t%q==0)
        {
            t /= q;
            q++;
            l++;
        }

        if(l>max_count)
        {
            max_count = l;
            begin = i;
        }
    }
    if(max_count)
    {
        cout << max_count << endl
             << begin;
        for (ll j = 1; j < max_count;j++)
        {
            cout << "*" << begin + j;
        }
    }
    else 
    {
        cout << 1 << endl
             << n;
             
    }

}
int main()
{
    int t = 1;
  //  cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
